package com.zm.repositories.jpa;

import com.zm.bean.MapBean;
import com.zm.bean.TestDoorRecordBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Optional;


public interface MapRepository extends JpaRepository<MapBean, Long> {

//    @Query(value = "select v.* ,c.cabinet_name,gd.city_name,c.address,c.jing ,c.wei from cd_cabinetversion v left join cd_cabinet_use c on c.cabinet_number = v.cabinet_number left join cd_gdcity gd on gd.adcode = c.city_id WHERE c.cabinet_number like '935%' ", nativeQuery = true)
//    List<MapBean> findAll();

    List<MapBean> findAll();

    MapBean save(MapBean bean);

    MapBean findMapBeanByCabinetNumber(String cabinetNumber);

    List<MapBean> findMapBeansByState(int state);

}
